import layout from '@/layout/layout/index.vue';

const meta = { requiresAuth: false };

export default {
  path: '/article',
  name: 'article',
  meta,
  authority: 'articleManager',
  redirect: { name: 'articleManager' },
  component: layout,
  children: (pre => [
    {
      path: 'article',
      name: `${pre}article`,
      authority: 'articleManager',
      component: () => import('@/pages/Article/Article/index.vue'),
      meta: { ...meta, title: '文章管理' }
    },
    {
      path: 'update/:id',
      name: `${pre}article`,
      authority: 'articleManager',
      component: () => import('@/pages/Article/Update/index.vue'),
      meta: { ...meta, title: '文章管理' }
    }
  ])('article-')
};
